package com.yungu.swift.socket.communication.message;

import com.yungu.swift.socket.communication.message.base.Message;
import com.yungu.swift.socket.communication.message.base.MessageType;

/**
 * 登录报文
 *
 * @author Zerrion
 * @date 2018/3/12
 */
public class LoginMessage extends Message {
    private String token;
    private From from;

    /**
     * 推送对象 枚举类型
     */
    public enum From {
        //乘客
        PASSENGER,
        //司机
        DRIVER,
        //服务端
        SERVER
    }

    public LoginMessage(From from) {
        super(MessageType.LOGIN, null);
        this.from = from;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public From getFrom() {
        return from;
    }

    public void setFrom(From from) {
        this.from = from;
    }
}